home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / hgrpic10.zip / READ.ME < prev   
Text File  |  1991-05-02  |  4KB  |  83 lines

  1. A2B.EXE - Converting Apple HGR screens to IBM CGA .PIC format
  2.  
  3. Compiled with:  Turbo C++ v1.00
  4.  
  5.  
  6. NOTE:  This file is *very* similar to a companion archive HGR2PCX.ZIP.
  7.        Basically, the overall program structure is the same, just the
  8.        video modes and output files are different.  You may want to
  9.        get both files to compare screen handling across two different
  10.        video modes.
  11.  
  12.  
  13. This converter was the result of a project that had me translating some
  14. existing Apple// graphics into IBM format.  Granted, I could have performed
  15. the translation on my //gs first (into .GIF format), then ported to IBM,
  16. then translated .GIF to .PIC, I decided to try to unscramble the Apple
  17. video memory map on the PC.  This was done for a couple of reasons:
  18.  
  19. 1)  I use Cross-Works (a 19200 baud null-modem Apple// <-> IBM link
  20.     designed for porting) to move files between my PC and //gs development
  21.     systems.  Cross-Works allows me to flag a batch of files and port
  22.     them all at once.  Since the Apple// series (even the //gs) is so
  23.     intrinsically slow, it made sense to do the major number crunching
  24.     on the PC side, where I could batch the files easily.
  25.  
  26. 2)  The images I was given to work with were in the form of BSAVEs from
  27.     the Apple HGR screen (basically, the equivalent of an IBM BSAVE in
  28.     BASIC).  Since Apple has no built-in method of reading pixel color
  29.     *from* the HiRes screen, and I was too lazy to write one (I prefer
  30.     PC's...really...besides, Borland has no development products for the
  31.     Apple// series, so why bother?), again I wanted to get *off* the
  32.     Apple and into the IBM as fast as possible.
  33.  
  34. 3)  The client wanted the resulting images in a form that could be read
  35.     by BASIC using the standard BLOAD memory trick.
  36.  
  37.  
  38. A2B assumes that the input file is a "raw" Apple BSAVE file that has
  39. been ported (somehow) to the PC.  It loads the file, unscrambling Apple's
  40. funky video memory mapping scheme, and then translates it onto the CGA
  41. screen in mode 4 (320x200x4), displaying the conversion as it goes.  It
  42. then saves out the screen in BLOAD PIC format.  Finally, the screen is
  43. cleared and the just-created PIC file is loaded in as a check.
  44.  
  45. To use A2B, just type:
  46.  
  47.     a2b <filename> [WAIT]
  48.  
  49. where:
  50.  
  51.     <filename> - Name of raw Apple file.  If no extension is given
  52.              .RAW is assumed.
  53.  
  54.     [WAIT]     - Optional parameter to beep and wait before clearing
  55.              the screen and exiting on completion.  Leave this
  56.              off if you're running a2b via the RAW2PIC.BAT file
  57.              (for multiple conversions).
  58.  
  59. The coded is heavily commented, so it should be interesting reading.  This
  60. little adventure serves several purposes:
  61.  
  62. 1) It gives you a look at the Apple memory map, both from the unscrambling
  63.    side and from the pixel color computation side (which is almost as
  64.    confusing).
  65.  
  66. 2) You get a look at several CGA manipulation routines.  A neat start for
  67.    people who want to mess around with PIC files on the CGA screen.  You
  68.    also get an example of a faster CGA-screen RAM accessing system,
  69.    utilizing a "pointer table".  Feel free to try this idea and expand
  70.    on it, as it makes working with the "split-plane" CGA memory map
  71.    relatively transparent.
  72.  
  73. 3) You get an example of using Turbo C++ pseudo variable to access the
  74.    CPU registers directly.
  75.  
  76. If you have any comments (please, nothing about the value of this program.
  77. If it's worthless to you, I'm sorry.  I probably won't use it again myself
  78. . . . but then, you never know), drop me a line.
  79.  
  80.  
  81. Scott J. Walter
  82. GEnie:  S.Walter4
  83.